Skip to content

Use intersection types in Object.assign defintion#4573

Closed
mhegazy wants to merge 3 commits into
release-1.6from
useIntersectionTypesInLib
Closed

Use intersection types in Object.assign defintion#4573
mhegazy wants to merge 3 commits into
release-1.6from
useIntersectionTypesInLib

Conversation

@mhegazy

@mhegazy mhegazy commented Aug 31, 2015

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/lib/es6.d.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

third

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"source objects" -> "source object"

"to copy properties from" -> "from which to copy properties"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Er... "to copy properties from" is indeed better I believe.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, agreed, sorry

@danquirk danquirk changed the title Use intersection types in Object.assing defintion Use intersection types in Object.assign defintion Sep 2, 2015
Comment thread src/lib/es6.d.ts

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you make this take a T and U array, then users can specifically pass in a union type for their U

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DanielRosenwasser But then the resulting type would follow the pattern T & (U1 | U2 | U3 ... ) which I don't think is what you want.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd need something like the proposal in #3870.

@vladima

vladima commented Sep 9, 2015

Copy link
Copy Markdown
Contributor

👍

@mhegazy

mhegazy commented Sep 18, 2015

Copy link
Copy Markdown
Contributor Author

merged manually.

@mhegazy mhegazy closed this Sep 18, 2015
@mhegazy mhegazy deleted the useIntersectionTypesInLib branch September 18, 2015 00:34
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants